import request from '@/utils/request'

// 查询用户通讯录列表
export function listContacts(query) {
  return request({
    url: '/info/search',
    method: 'get',
    params: query
  })
}

// 查询用户通讯录详细
export function getContacts(id) {
  return request({
    url: '/info/search' + id,
    method: 'get'
  })
}

// 新增用户通讯录
export function addContacts(data) {
  return request({
    url: '/info/add',
    method: 'post',
    data: data
  })
}

// 修改用户通讯录
export function updateContacts(data) {
  return request({
    url: '/info/update',
    method: 'post',
    data: data
  })
}

// 删除用户通讯录
export function delContacts(id) {
  return request({
    url: '/info/delete' + id,
    method: 'delete'
  })
}

// 导出用户通讯录
export function exportContacts(query) {
  return request({
    url: '/business/contacts/export',
    method: 'get',
    params: query
  })
}